package com.xique.door.service.impl;

import com.xique.door.bean.domain.ParkInfo;
import com.xique.door.mapper.ParkInfoMapper;
import com.xique.door.service.IParkInfoService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author shd
 * @create 2022/1/5 11:46
 */
@Service
public class ParkInfoServiceImpl implements IParkInfoService {

    @Autowired
    private ParkInfoMapper parkInfoMapper;

    @Override
    public ParkInfo selectParkInfoById(Long id) {
        return parkInfoMapper.selectParkInfoById(id);
    }

    @Override
    public List<ParkInfo> selectParkInfoByIds(List<Long> ids) {
        if (CollectionUtils.isEmpty(ids)) {
            return new ArrayList<>();
        }
        return parkInfoMapper.selectParkInfoByIds(ids);
    }

    @Override
    public int updateParkInfoById(ParkInfo parkInfo) {
        return parkInfoMapper.updateParkInfoById(parkInfo);
    }
}
